package mysql

import "gorm.io/gorm"

type Student struct {
	gorm.Model
	Account  string `gorm:"type:varchar(30)"json:"Account"`
	Password string `gorm:"type:varchar(32)"json:"Password"`
	Image    string `gorm:"type:varchar(500)"json:"Image"`
	Name     string `gorm:"type:varchar(50)"json:"Name"`
}

type Teachers struct {
	gorm.Model
	TeachersName  string `gorm:"type:varchar(30)"json:"TeachersName"`
	CourseImage   string `gorm:"type:varchar(500)"json:"CourseImage"`
	TeachersImage string `gorm:"type:varchar(500)"json:"TeachersImage"`
}

type Course struct {
	gorm.Model
	TeachersId int    `gorm:"type:int"json:"TeachersId"`
	Title      string `gorm:"type:varchar(50)" json:"Title"`
	Types      string `gorm:"type:varchar(30)"json:"Types"`
	Content    string `gorm:"type:varchar(500)"json:"Content"`
}

type Collect struct {
	gorm.Model
	UserId   uint   `gorm:"type:int" json:"userId"`
	CourseId int    `gorm:"type:int" json:"courseId"`
	Courses  string `gorm:"type:varchar(500)" json:"courses"`
	Num      int    `gorm:"type:int" json:"num"`
}

type Evaluate struct {
	gorm.Model
	UserId    int    `gorm:"type:int" json:"userId"`
	CollectId int    `gorm:"type:int" json:"collectId"`
	Content   string `gorm:"type:varchar(500)" json:"content"`
}
